<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

    <script>
        for(var i=1;i<=5;i++){
            document.write("<h1>hello!</h1>"); //将h1元素输出到body中
        }


        var b=confirm("确定删除吗?");
        if(b){
            document.write("<h1>删除成功!</h1>");
        }else{
            document.write("<h1>你取消了操作!</h1>");
        }


        var name=prompt("请输入你的名字:");
        document.write("<h1>名字:"+name+"!</h1>");
    </script>
</body>
</html>